package server;

import java.io.Serializable;

/**
 * This class provide the functionality for seeds
 * which takes parameters common name, scitific name
 * hardiness, and so on.
 * @author Valerie
 */
public class Seed implements Serializable{
    private String comName;
    private String sciName;
    private int hardiness;
    private String reqs;
    private String tips;
    private String harvInfo;
    private String harvestStart;
    private String harvestEnd;
    private int seedID;
    private String farmerID;
    private static int count=0;
    
    public Seed(String comName, String sciName, int hardiness, String reqs, String tips,
                            String harvInfo, String harvestStart, String harvestEnd, String farmerID){
        this.comName=comName;
        this.sciName=sciName;
        this.hardiness=hardiness;
        this.reqs=reqs;
        this.tips=tips;
        this.harvInfo=harvInfo;
        this.harvestStart=harvestStart;
        this.harvestEnd=harvestEnd;
        this.farmerID=farmerID;
        this.seedID=count;
        count++;
    }
    //for when you need a seed for reference, not creating a new one to write to the db
        public Seed(String comName, String sciName, int hardiness, String reqs, String tips,
                            String harvInfo, String harvestStart, String harvestEnd, String farmerID, int seedID){
        this.comName=comName;
        this.sciName=sciName;
        this.hardiness=hardiness;
        this.reqs=reqs;
        this.tips=tips;
        this.harvInfo=harvInfo;
        this.harvestStart=harvestStart;
        this.harvestEnd=harvestEnd;
        this.farmerID=farmerID;
        this.seedID=seedID;
    }

    /*
     * The following methods are setters and getters
     * They're pretty much self-explanatory 
     */
    /**
     * Get the Common Name
     * @return
     */
    public String getComName() {
        return comName;
    }
	/**
	 * set the Common Name
	 * @param comName
	 */
    public void setComName(String comName) {
        this.comName = comName;
    }

    /**
     * Get the farmer ID
     * @return
     */
    public String getFarmerID() {
        return farmerID;
    }
	/**
	 * Set the farmer ID
	 * @param farmerID
	 */
    public void setFarmerID(String farmerID) {
        this.farmerID = farmerID;
    }
    
	/**
	 * get the hardiness zone 
	 * @return
	 */
    public int getHardiness() {
        return hardiness;
    }

    /**
     * Set the hardiness zone
     * @param hardiness
     */
    public void setHardiness(int hardiness) {
        this.hardiness = hardiness;
    }

    /**
     * Get the harvest information
     * @return
     */
    public String getHarvInfo() {
        return harvInfo;
    }

    /**
     * Set the harvest information
     * @param harvInfo
     */
    public void setHarvInfo(String harvInfo) {
        this.harvInfo = harvInfo;
    }

    /**
     * Get the end of growing season 
     * @return
     */
    public String getHarvestEnd() {
        return harvestEnd;
    }

    /**
     * Set the end of growing season 
     * @return
     */
    public void setHarvestEnd(String harvestEnd) {
        this.harvestEnd = harvestEnd;
    }

    /**
     * Get the starting of growing season 
     * @return
     */
    public String getHarvestStart() {
        return harvestStart;
    }
    
    /**
     * Set the starting of growing season 
     * @return
     */
    public void setHarvestStart(String harvestStart) {
        this.harvestStart = harvestStart;
    }

    /**
     * get the requirements of the seed
     * @return
     */
    public String getReqs() {
        return reqs;
    }

    /**
     * set the requirements of the seed
     * @param reqs
     */
    public void setReqs(String reqs) {
        this.reqs = reqs;
    }

    /**
     * Get the scientific name 
     * @return
     */
    public String getSciName() {
        return sciName;
    }

    /**
     * Set the scientific name  
     * @param sciName
     */
    public void setSciName(String sciName) {
        this.sciName = sciName;
    }

    /**
     * get the seed id
     * @return
     */
    public int getSeedID() {
        return seedID;
    }

    /**
     * set the seed id
     * @param seedID
     */
    public void setSeedID(int seedID) {
        this.seedID = seedID;
    }

    /**
     * get the growing seed tips
     * @return
     */
    public String getTips() {
        return tips;
    }

    /**
     * set the growing seed tips
     * @return
     */
    public void setTips(String tips) {
        this.tips = tips;
    }
    
}
